/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights
 * reserved. <a>http://www.cqcis.com</a>
 */
package com.cqcis.uip.base.framework.core;

/**
 * 线程池配置
 * 
 * @author huangmy
 * @date   2008-8-26
 */
public class ThreadPoolConfig {
	private int threadPoolCoreSize = 1;
	private int threadPoolMaxSize = 16;
	private int threadPoolKeepAliveTime = 60; // seconds
	
	public ThreadPoolConfig() {		
	}
	
	public ThreadPoolConfig(int coreSize, int maxSize, int keepAliveTime) {
		this.threadPoolCoreSize = coreSize;
		this.threadPoolMaxSize = maxSize;
		this.threadPoolKeepAliveTime = keepAliveTime;
	}
	
	/**
	 * 核心线程数
	 * 
	 * @return
	 */
	public int getCoreSize() {
		return this.threadPoolCoreSize;		
	}
	
	/**
	 * 最大线程数
	 * 
	 * @return
	 */
	public int getMaxSize() {
		return this.threadPoolMaxSize;
	}
	
	/**
	 * 空闲存活时间
	 * 
	 * @return
	 */
	public int getKeepAliveTime() {
		return this.threadPoolKeepAliveTime;
	}
}
